package com.synergy.stockflow.production.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.synergy.stockflow.production.create.ProductionPlanDetailDTO;
import com.synergy.stockflow.production.entity.ProductionPlanDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface ProductionPlanDetailMapper extends BaseMapper<ProductionPlanDetail> {
    List<ProductionPlanDetailDTO> selectByPlanCode(String planCode);

    List<ProductionPlanDetail> selectByPlanId(String planId);

    ProductionPlanDetail getByPlanId(String planId);

    int updateByPlanId(@Param("actualQuantity")BigDecimal actualQuantity,
                       @Param("completedQuantity")BigDecimal completedQuantity,
                       @Param("planId")String planId);
}